// 
//  class.js
//  goddy
//  
//  Created by goddy zhao on 2010-08-22.
//  Copyright 2010 goddy. All rights reserved.
// 

goddy.provide("goddy.class");




/**
 * Declare a class
 * 
 * @param {string} classname: The name of class
 * @param {function} superclass: The super class
 * @param {object} props: Properties of the class
 * 
 * @return {function} : The class
 */
goddy.class.declare = function(classname, superclass, props){
	if(!goddy.is_string(classname)){
		/*
			TODO: apply function to non-string classname
		*/
	}
	

	//classname is string
	var new_class = function(){};
	
	// mixin
	for( var prop in props){
		new_class.prototype[prop] = props[prop];
	}
	
		
	
	
	/*
		TODO : fully implement superclass
	*/
	// new_class.prototype = new superclass();
	
	return goddy.set_object(classname, new_class);
}

